<?php
include('../../include/functions.inc.php');
include('../../include/inputbuilder.inc.php');
include('../../include/maintenance.inc.php');

$maintenance = unserialize($_SESSION['mUser']);
$list = $db->query_select("cllg_entity", NULL);
$list2 = $db->query_select("cllg_perfil", NULL);
?>
<form id="<?php echo $maintenance->formName; ?>" name="<?php echo $maintenance->formName; ?>" method="POST" action="<?php echo $maintenance->saveNewUrlPage; ?>">
    <table class=""  width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <th scope="col"><legend>DATOS USUARIO</legend></th>
            <th scope="col">
                <legend>
                    <div class="btn-group" style="margin-left: 30%">
                        <input type="button" name="cmdOk" class="btn btn-info" id="cmdOk" value="Guardar" onClick="javascript:formOkBt($(this.form),newAction);" />          
                        <input  class="btn btn-info" type="button" name="cmdCancel" id="cmdCancel" value="Cancelar" onClick="loadTable();jQuery('#cmAddcontainer').show();" />
                    </div>
                </legend>
            </th>
        </tr>
        <tr>
            <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">

                    <tr>
                        <td width="20%">* USUARIO</td>
                        <td width="80%"><input name="USER_NAME" type="text" id="USER_NAME" />          </td>
                    </tr>
                    <tr>
                        <td>* CONTRASE&Ntilde;A</td>
                        <td><input name="PASSWORD" type="password" id="PASSWORD" />          </td>
                    </tr>
                    <tr>
                        <td>* NOMBRES</td>
                        <td><input name="FIRST_NAME" type="text" id="FIRST_NAME" /></td>
                    </tr>
                    <tr>
                        <td>APELLIDOS</td>
                        <td><input name="LAST_NAME" type="text" id="LAST_NAME" />
                            <input name="STATUS" type="hidden" id="STATUS" value="1" /></td>
                    </tr>
                    <tr>
                        <td>* ENTIDAD</td>
                        <td><select name="FK_ENTITY" id="FK_ENTITY">
                                <?php foreach ($list as $it) { ?>
                                    <option value="<?php echo $it["ID"]; ?>" > <?php echo $it["NAME"]; ?> </option>
                                <?php } ?>
                            </select></td>
                    </tr>
                    <tr>
                        <td>* PERFIL USUARIO</td>
                        <td><select name="FK_PERFIL" id="FK_PERFIL">
                                <?php foreach ($list2 as $it) { ?>
                                    <option value="<?php echo $it["ID"]; ?>" > <?php echo $it["NAME"]; ?> </option>
                                <?php } ?>
                            </select></td>
                    </tr>
                    <tr>
                        <td>PUEDE AUTORIZAR </td>
                        <td>
                            <select name="AUTORIZA" id="AUTORIZA">
                                <option value="1">SI</option>
                                <option value="0">NO</option>
                            </select>
                        </td>
                    </tr>
                </table></td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;</td>
        </tr>
    </table>
</form>    

